@extends('layout.master')
@section('content')

<div class="widget-body am-fr">



    <form class="am-form tpl-form-border-form tpl-form-border-br" action="/cat/{{$cat->cat_id}}" method="post">

    {{csrf_field()}}
    {{ method_field('PATCH') }}
    <div class="am-form-group">
        <label for="user-name" class="am-u-sm-3 am-form-label">栏目名 <span class="tpl-form-line-small-title"></span></label>
        <div class="am-u-sm-5" style="float:left;">
            <input type="text" class="tpl-form-input" name="cat_name" id="cat_name" placeholder="请输入栏目名" value="{{$cat->cat_name}}">
            
        </div>
    </div>

     <div class="am-form-group">
        <label for="user-weibo" class="am-u-sm-3 am-form-label">父栏目<span class="tpl-form-line-small-title"></span></label>
        <div class="am-u-sm-5"  style="float:left;">
            <select class="select" size="1" name="parent_id">
                <option value="0">顶级栏目</option>
                @foreach($cats as $cat)
                <option value="{{$cat->cat_id}}">
                    <?php echo '|-',str_repeat('--',$cat->lev);?>
                    {{$cat->cat_name}}
                </option>
                @endforeach
            </select>
        </div>
    </div>


    
    <div class="am-form-group">
        <div class="am-u-sm-9 am-u-sm-push-3">
            <button type="submit" class="am-btn am-btn-primary tpl-btn-bg-color-success ">提交</button>
        </div>
    </div>
</form>
</div>
@endsection
